package club.ruanx.spider.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import java.util.List;

/**
 * @author 阮胜
 * @date 2018/11/26 14:26
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DoubanMovie {
    /**
     * 数据格式:
     * rating : {"max":10,"average":9,"stars":"45","min":0}
     * reviews_count : 15360
     * wish_count : 882236
     * douban_site :
     * year : 2018
     * images : {"small":"https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2519070834.jpg","large":"https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2519070834.jpg","medium":"https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2519070834.jpg"}
     * alt : https://movie.douban.com/subject/26752088/
     * id : 26752088
     * mobile_url : https://movie.douban.com/subject/26752088/mobile
     * title : 我不是药神
     * do_count : null
     * share_url : https://m.douban.com/movie/subject/26752088
     * seasons_count : null
     * schedule_url :
     * episodes_count : null
     * countries : ["中国大陆"]
     * genres : ["剧情","喜剧"]
     * collect_count : 2748806
     * casts : [{"alt":"https://movie.douban.com/celebrity/1274297/","avatars":{"small":"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p43738.jpg","large":"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p43738.jpg","medium":"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p43738.jpg"},"name":"徐峥","id":"1274297"},{"alt":"https://movie.douban.com/celebrity/1313837/","avatars":{"small":"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1496577458.38.jpg","large":"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1496577458.38.jpg","medium":"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1496577458.38.jpg"},"name":"王传君","id":"1313837"},{"alt":"https://movie.douban.com/celebrity/1276085/","avatars":{"small":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1514533436.1.jpg","large":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1514533436.1.jpg","medium":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1514533436.1.jpg"},"name":"周一围","id":"1276085"},{"alt":"https://movie.douban.com/celebrity/1312976/","avatars":{"small":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1530515420.42.jpg","large":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1530515420.42.jpg","medium":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1530515420.42.jpg"},"name":"谭卓","id":"1312976"}]
     * current_season : null
     * original_title : 我不是药神
     * summary : 普通中年男子程勇（徐峥 饰）经营着一家保健品店，失意又失婚。不速之客吕受益（王传君 饰）的到来，让他开辟了一条去印度买药做“代购”的新事业，虽然困难重重，但他在这条“买药之路”上发现了商机，一发不可收拾地做起了治疗慢粒白血病的印度仿制药独家代理商。赚钱的同时，他也认识了几个病患及家属，为救女儿被迫做舞女的思慧（谭卓 饰）、说一口流利“神父腔”英语的刘牧师（杨新鸣 饰），以及脾气暴烈的“黄毛”（章宇 饰），几个人合伙做起了生意，利润倍增的同时也危机四伏。程勇昔日的小舅子曹警官（周一围 饰）奉命调查仿制药的源头，假药贩子张长林（王砚辉 饰）和瑞士正牌医药代表（李乃文 饰）也对其虎视眈眈，生意逐渐变成了一场关于救赎的拉锯战。
     * 本片改编自慢粒白血病患者陆勇代购抗癌药的真实事迹。©豆瓣
     * subtype : movie
     * directors : [{"alt":"https://movie.douban.com/celebrity/1349765/","avatars":{"small":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1529658740.26.jpg","large":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1529658740.26.jpg","medium":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1529658740.26.jpg"},"name":"文牧野","id":"1349765"}]
     * comments_count : 301085
     * ratings_count : 822717
     * aka : ["中国药神","印度药神","印度药商","生命之路","Dying to Survive","Drug Dealer"]
     */

    @Id
    private String id;
    private RatingBean rating;
    private int reviews_count;
    private int wish_count;
    private String douban_site;
    private String year;
    private ImagesBean images;
    private String alt;
    private String mobile_url;
    private String title;
    private Object do_count;
    private String share_url;
    private Object seasons_count;
    private String schedule_url;
    private Object episodes_count;
    private int collect_count;
    private Object current_season;
    private String original_title;
    private String summary;
    private String subtype;
    private int comments_count;
    private int ratings_count;
    private List<String> countries;
    private List<String> genres;
    private List<CastsBean> casts;
    private List<DirectorsBean> directors;
    private List<String> aka;
    private Boolean synchronization;

    @Data
    public static class RatingBean {
        /**
         * max : 10
         * average : 9
         * stars : 45
         * min : 0
         */
        private int max;
        private int average;
        private String stars;
        private int min;
    }

    @Data
    public static class ImagesBean {
        /**
         * small : https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2519070834.jpg
         * large : https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2519070834.jpg
         * medium : https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2519070834.jpg
         */
        private String small;
        private String large;
        private String medium;
    }

    @Data
    public static class CastsBean {
        /**
         * alt : https://movie.douban.com/celebrity/1274297/
         * avatars : {"small":"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p43738.jpg","large":"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p43738.jpg","medium":"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p43738.jpg"}
         * name : 徐峥
         * id : 1274297
         */
        private String alt;
        private AvatarsBean avatars;
        private String name;
        private String id;

        @Data
        public static class AvatarsBean {
            /**
             * small : https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p43738.jpg
             * large : https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p43738.jpg
             * medium : https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p43738.jpg
             */
            private String small;
            private String large;
            private String medium;

        }
    }

    @Data
    public static class DirectorsBean {
        /**
         * alt : https://movie.douban.com/celebrity/1349765/
         * avatars : {"small":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1529658740.26.jpg","large":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1529658740.26.jpg","medium":"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1529658740.26.jpg"}
         * name : 文牧野
         * id : 1349765
         */
        private String alt;
        private AvatarsBeanX avatars;
        private String name;
        private String id;

        @Data
        public static class AvatarsBeanX {
            /**
             * small : https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1529658740.26.jpg
             * large : https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1529658740.26.jpg
             * medium : https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1529658740.26.jpg
             */
            private String small;
            private String large;
            private String medium;
        }
    }
}
